import axios from '../axios.js'
export default {
    // 拿到所有服务项目
    getServiceProject(data) {
        return axios({
            url: '/nfuhServiceproject/selectAll',
            method: 'get',         
        })
    },
    // 拿到所有服务类型
    getServiceType(val) {
        return axios({
            url: '/nfuhServiceproject/selectByProjectId',
            method: 'post',
            data:val         
        })
    },
    // 传后端当前开台id
    foundingId(val) {
        // console.log(val);
        return axios({
            url: '/nfuhOrder/selectByTotalorder',
            method: 'get',
            params:{id:val}         
        })
    },
    // 传后端当前房间对应的每条服务类型
    nowRoomOneType(val) {
        // console.log(val);
        return axios({
            url: '/nfuhOrder/insertOrder',
            method: 'post',
            data:val         
        })
    },
    // 根据每个项目的id获取对应的技师
    idByTechnician(val) {
        // console.log(id);
        return axios({
            url: '/technicianLoop/serviceTechnicianState',
            method: 'post',
            data:{orderServicetype:val}         
        })
    },
    // 点击选择项目通过订单id查询信息
    nowOrderMessage(val) {
        // console.log(id);
        return axios({
            url: '/nfuhOrder/selectByTotalorder',
            method: 'get',
            params:{id:val}         
        })
    },
    // 点击上钟
    starTime(id) {
        // console.log(id);
        return axios({
            url: '/nfuhOrder/updateClocktime',
            method: 'POST',
            data:{id:id}
        })
    },
    // 发送整条数据
    postMessage(val) {
        // console.log(val);
        return axios({
            url: '/nfuhOrder/updateOrder',
            method: 'POST',
            data:val
        })
    },
    // 删除数据
    delmessage(id) {
        // console.log(id);
        return axios({
            url: '/nfuhOrder/deleteOrder/' + id,
            method: 'POST',
        })
    },
    // 加钟
    addtime(val) {
        console.log(typeof val);
        console.log( val);
        return axios({
            url: '/nfuhOrder/addClock',
            method: 'POST',
            data:val
        })
    },
}